package top.leyi.entity.Talk;

import com.fasterxml.jackson.annotation.JsonIgnore;
import top.leyi.entity.user.User;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* @desc 说说实体类
 */

public class Talk  implements Serializable {

    private static final long serialVersionUID = 123456789L;
    @JsonIgnore
    private int id;

    private String content;

    private int likes;

    private String headPic;

    private int user_id;

    private String username;

    private String pics;

    public List<Talk> talks = new ArrayList<>();
    @JsonIgnore
    private User user;
    @JsonIgnore
    private boolean isLike = false;
    @JsonIgnore
    private String time;
    @JsonIgnore
    private List<Integer> whoGoods = new ArrayList<>();
    private boolean collected;
    private int collectedId;

    public int getCollectedId() {
        return collectedId;
    }

    public void setCollectedId(int collectedId) {
        this.collectedId = collectedId;
    }

    public boolean isCollected() {
        return collected;
    }

    public void setCollected(boolean collected) {
        this.collected = collected;
    }

    public void setTalks(List  talks) {
        this.talks = talks;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public String getUsername() {
        return username;
    }

    public String getHeadPic() {
        return headPic;
    }

    public void setHeadPic(String headPic) {
        this.headPic = headPic;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public boolean isLike() {
        return isLike;
    }

    public int getLikes() {
        return likes;
    }

    public void setLikes(int likes) {
        this.likes = likes;
    }

    public User getUser() {
        return user;
    }

    public boolean getIsLike() {
        return isLike;
    }

    public void setLike(boolean like) {
        isLike = like;
    }



    public List<Integer> getWhoGoods() {
        return whoGoods;
    }

    public void setWhoGoods(List<Integer> whoGoods) {
        this.whoGoods = whoGoods;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public void  addTalk(Talk talk){
        talks.add(talk);
    }
    public List  getTalks(){
        return talks;
    }
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public int getUser_id() {
        return user_id;
    }

    public void setUser_id(int user_id) {
        this.user_id = user_id;
    }

    public String getPics() {
        return pics;
    }

    public void setPics(String  pics) {
        this.pics = pics;
    }



    @Override
    public String toString() {
        return "Talk{" +
                "id=" + id +
                ", content='" + content + '\'' +
                ", likes=" + likes +
                ", user_id=" + user_id +
                ", pics='" + pics + '\'' +
                ", talks=" + talks +
                ", user=" + user +
                ", isLike=" + isLike +
                ", whoGoods=" + whoGoods +
                '}';
    }
}
